iterative-custom.cpp